/**
 * Copyright (c) 2009-2010 by Glodon
 * All rights reserved.
 */
package com.cws.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 作用于 VO 类，进行数据库多表关联查询时，通过该注解标识各表间的关联关系。如：
 * <pre><code>
 * &#64;Relations(base = BidNoticeItem.class, value = {
 *     &#64;Relation(refer = BidNotice.class, referColumn = "bidNoticeId", baseColumn = "noticeId", type = RelationType.LEFT),
 *     &#64;Relation(refer = ProjectInfo.class, referColumn = "projectId", base = BidNotice.class, baseColumn = "projectId", type = RelationType.LEFT),
 *     &#64;Relation(refer = BidPackage.class, referColumn = "packageId", baseColumn = "packageId", type = RelationType.LEFT)
 * })
 * public class TenderNoticeVO extends BidNotice {
 *     … …
 * }
 * </code></pre>
 * <p>
 * <b>创建日期</b> 2014年3月8日
 * </p>
 * @author lysming
 * @author <a href="mailto:hemw@grandsoft.com.cn">何明旺</a>
 * @since 3.0
 * @see Relation
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public @interface Relations {
	
	/**
	 * @return 主表对应的 PO 类
	 */
	Class<?> base();
	
	/**
	 * @return 多表之间的关联关系
	 */
	Relation[] value();
}